<?php
/*
* Kusht Mud.
* ----
* The MIT License
* Copyright (c) 2010 Andrew Tutt
* ----
*/

/* UserCharacter Class
*
* This is the Game Object for a User Character adding User-Relevant 
* Functionality to the Character class
*
*/

require_once "Character.class.inc";

class UserCharacter extends Character {
	public $owner_id;	/* This is the User's Owner's Account */
	public $connector; 	/* This is the User's Connector  */
	
	public $logon;				// When it happened
	public $save_time;			// Last time save happened (we will autosave of course)
	public $prompt;				// User custom prompt
	
	// Developer Variables
	public $editingItem;
	
	/* -- LOW LEVEL FUNCTIONS -- */
	
	function send($msg, $wrapper = TEXT) {
		$this->connector->send($msg,$wrapper);
	}
	
	function send_data($data) {
		$this->connector->send_data($data);
	}
	
	function loadClient() {
		ClientHandler::load($this);
	}	
	
	function quit() {
		World::rmv_char($this);
		// Send a disappearance message to the room <- Here
		$this->in_room()->rmv_char($this);	
		$this->connector->disconnect();
		echo "USER " . $this->name . " QUIT.\n";
	}
}

?>